/**
 * Created by asus on 2016/9/9.
 */
function getBrowserInfo() {
    var agent = navigator.userAgent.toLowerCase();

    var regStr_ie = /msie [\d.]+/g;
    var regStr_ff = /firefox\/[\d.]+/g;
    var regStr_chrome = /chrome\/[\d.]+/g;
    var regStr_saf = /safari\/[\d.]+/g;
//IE
    if (agent.indexOf("msie") > 0) {
        return agent.match(regStr_ie);
    }

//firefox
    if (agent.indexOf("firefox") > 0) {
        return agent.match(regStr_ff);
    }

//Chrome
    if (agent.indexOf("chrome") > 0) {
        return agent.match(regStr_chrome);
    }

//Safari
    if (agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0) {
        return agent.match(regStr_saf);
    }

}

var agent = navigator.userAgent.toLowerCase();

var browser = getBrowserInfo();

var verinfo = (browser + "").replace(/[^0-9.]/ig, "");

if (agent.indexOf("msie") > 0 && verinfo <= 8.0) {
    alert('您的IE浏览器版本太低，为了更好的用户体验，请升级你的浏览器')
}